package org.mspring.mlog.entity;

import java.util.Date;
import org.mspring.nbee.db.annotation.AutoIncrement;
import org.mspring.nbee.db.annotation.Col;
import org.mspring.nbee.db.annotation.Id;
import org.mspring.nbee.db.annotation.Mappable;
import org.mspring.nbee.db.entity.BaseEntity;
import org.mspring.nbee.db.orm.EntityField;

/**
 *
 * @author Gao Youbo
 * @since 2016-06-05 10:10:15
 */
@Mappable
public class ResourceEntity extends BaseEntity {

    @Id
    @AutoIncrement
    @Col(length = 19)
    private Long id;
    @Col(nullable = false, length = 32)
    private String name;
    @Col(length = 32)
    private String nodeId;
    @Col(length = 32)
    private String type;
    @Col(length = 512)
    private String url;

    public Long getId() {
        return this.id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getName() {
        return this.name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getNodeId() {
        return this.nodeId;
    }

    public void setNodeId(String nodeId) {
        this.nodeId = nodeId;
    }

    public String getType() {
        return this.type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public String getUrl() {
        return this.url;
    }

    public void setUrl(String url) {
        this.url = url;
    }

    public static class Fields {
        public static final EntityField id = new EntityField("id", "id", Long.class, 19, false);
        public static final EntityField name = new EntityField("name", "name", String.class, 32, false);
        public static final EntityField nodeId = new EntityField("nodeId", "node_id", String.class, 32, true);
        public static final EntityField type = new EntityField("type", "type", String.class, 32, true);
        public static final EntityField url = new EntityField("url", "url", String.class, 512, true);
    }
}
